package com.sport.setting.feign;

import com.sport.apis.setting.ISettingClient;
import com.sport.model.common.dtos.ResponseResult;
import com.sport.model.user.bos.AccountUserBo;
import com.sport.setting.service.SportPreInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.constraints.NotNull;

@RestController
@RequestMapping("/api/setting")
public class SettingClient implements ISettingClient {

    private SportPreInfoService sportPreInfoService;

    public SettingClient(@Autowired SportPreInfoService sportPreInfoService) {
        this.sportPreInfoService = sportPreInfoService;
    }

    @Override
    @GetMapping("/getPreInfo")
    public ResponseResult getPreInfo(@RequestBody @NotNull String schoolTenementId) {
        return sportPreInfoService.getPreInfo(schoolTenementId);
    }

    @Override
    @GetMapping("/initSportMeeting")
    public ResponseResult initSportMeeting(@RequestBody @NotNull String schoolTenementId) {
        return sportPreInfoService.initSportMeeting(schoolTenementId);
    }
}
